import java.io.File;
import java.io.PrintStream;
import java.util.Scanner;


public class inflate {

	public static int timeLimit;
	public static int nProbClasses;
	public static problem[] probs;
	
	public static void main(String[] args) throws Exception {
		Scanner scanner = new Scanner(new File("agrinet.in"));
		PrintStream ps = new PrintStream(new File("agrinet.out"));
		System.setOut(ps);
		
		timeLimit = scanner.nextInt();
		nProbClasses = scanner.nextInt();
		
		probs = new problem[nProbClasses];
		for (int i=0;i<nProbClasses;++i) {
			int point = scanner.nextInt();
			int tlimit = scanner.nextInt();
			probs[i] = new problem(point, tlimit);
		}
		
		
		ps.close();
	}
	
}
class problem implements Comparable<problem> {
	int tlimit;
	int point;
	public problem(int tlimit, int point) {
		this.tlimit = tlimit;
		this.point = point;
	}
	@Override
	public int compareTo(problem arg0) {
		// TODO Auto-generated method stub
		return 0;
	}
}
